package com.xmcc.dao;


import com.xmcc.pojo.SysRoleUser;
import com.xmcc.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface SysUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(SysUser record);

    int insertSelective(SysUser record);

    SysUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(SysUser record);

    int updateByPrimaryKey(SysUser record);

    int checkMail(@Param("mail") String mail, @Param("id") Integer id);

    int checkTelephone(@Param("telephone") String telephone,@Param("id") Integer id);

    int checkOldPassword(@Param("id") Integer id, @Param("oldPassword") String oldPassword);

    void updatePassword(@Param("id")Integer id,@Param("newPassword") String newPassword);

    SysUser login(@Param("keyWord") String keyWord);

    List<SysUser> queryAll();

    List<SysUser> queryByDeptId(Integer deptId);

    List<SysUser> usersList(@Param("list") List<SysRoleUser> sysRoleUsers);

    List<SysUser> uNusersList(@Param("list") List<SysRoleUser> sysRoleUsers);

    SysUser selectByDeptId(@Param("deptId") Integer deptId);

}
